import request from '@/utils/request';

export const getCurrentSearchList = async ({ key = undefined, id = undefined }) => {
  return request(`/searchlist/goods/list?searchlist=${key}&category_id=${id}`, {
    method: 'get',
  });
}

// 获取商品详情
export const getProductDetail = async goodsId => {
  return request(`/goods/detail`, {
    method: 'get',
    params: {
      goodsId
    }
  })
}
// 获取商品评论
export const getProductComments = async goodsId => {
  return request(`/goods/comments`, {
    method: 'get',
    params: {
      goodsId
    }
  })
}